<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>发起会议</title>
		
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		
		<link rel="stylesheet" href="css/font.css">
		<link rel="stylesheet" href="css/xadmin.css">
		<link rel="stylesheet" href="../css/addmeetings.css">
		
		<script src="../js/jquery-3.3.1.js"></script>
		<script src="../js/bootstrap.js"></script>
		<link rel="stylesheet" href="../css/bootstrap.css">
	</head>
	<body>
		<h1 id="addmeeting-title">发起会议</h1>
		  <div id="div-form">
			<form id="form-add">
				
			  <div class="form-group">
				<label for="exampleInputrid">会议室编号</label>
				<input name="roomId" type="text" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
			  </div>
			  
			  <div class="form-group">
				<label for="exampleInputrname">会议名称</label>
				<input name="mName" type="text" class="form-control" id="exampleInputPassword1">
			  </div>
			  
			  <div class="form-group">
			  		<label for="exampleInputrname">会议内容</label>
			  		<input name="mInfo" type="text" class="form-control" id="exampleInputPassword1">
			  </div>
			  
			  <div class="form-group">
			  		<label for="exampleInputrname">会议开始时间</label>
			  		<input name="startTime" type="date" class="form-control" id="exampleInputPassword1">
			  </div>
			  
			  <button onclick="addData()" type="button" class="btn btn-primary">添加</button>
			</form>
		  </div>
		  
		  
		  <script>
			  let baseUrl = "http://localhost:8080/company"
			  
			  function addData() {
				  
				console.log('添加部门....')
			  	let addmsg = $('#form-add').serialize()
				// decodeURIComponent( params , true );
			  	console.log(addmsg)
			  	$.ajax({
			  		url: baseUrl + "/meeting/add",
			  		type: "post",
			  		dataType: "json",
			  		data: addmsg,
			  		success: function(data) {
			  			if(data.code == 200) {
			  				// 添加成功，刷新画面
							alert("添加成功")
			  				location.href="addmeetings.html"
			  			}
			  		}
			  	})
			  }
		  </script>
	</body>
</html>